<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 300px;
            margin: 0 auto;
        }

        li {
            list-style: none;
        }

        .item {
            background-color: blue;
            border: 1px solid red;
            color: white;
            text-align: center;
            float: left;
            width: 148px;
            line-height: 40px;
        }

        .box>li:hover {
            background-color: skyblue;
            font-weight: bold;
        }

        .item>ul {
            display: none;
            background-color: white;
            color: black;
        }
        .item:hover ul{
            display: block;
            font-weight: normal;
        }
        .item li:hover{
            font-weight: bold;
            color: blue;
        }
    </style>
</head>

<body>
    <ul class="box">
        <li class="item">视频教程
            <ul>
                <li>全部视频教程</li>
                <li>大前端</li>
                <li>Java</li>
                <li>Python</li>
            </ul>
        </li>
        <li class="item">考试认证
            <ul>
                <li>pmp</li>
                <li>红帽</li>
            </ul>
        </li>
    </ul>
</body>

</html>